<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link type="text/css" rel="Stylesheet"
	href="/MusicStore/static/style/front.css" />
<script type="text/javascript" src="../static/js/jquery-1.10.2.min.js"></script>
<script src="../static/js/jquery.validate.js"></script>
<script type="text/javascript">
	$(function() {
		loadOrders();
	})
	function loadOrders() {
		$.ajax({
					url : "${pageContext.request.contextPath}/admin/order",
					dataType : "json",
					type : "get",
					success : function(json) {
						$("#order-list").empty();
						json
								.map(function(item, index) {
									var html = "<tr><td>"
											+ item.id
											+ "</td><td>"
											+ item.orderDate
											+ "</td></tr>";
									$("#order-list").append(html);
								});
					}
				});
	}
</script>
</head>
<body>
	<div id="wrapper">
		<div id="header">
			<div id="header-logo">
				<a href="index"><img
					src="/MusicStore/static/style/images/logo.png" alt=""></img></a>
			</div>
			<div class="clearBoth"></div>
			<div id="header-search"></div>
			<div id="header-nav">
				<ul>

					<li><a href="manage">后台管理</a></li>
					<li><a href="product-list">商品管理</a></li>
					<li><a href="manage">订单管理</a></li>
					<li><a href="manage-genre">分类管理</a></li>
				</ul>
				<label id="welcome">您好，Sam。</label>
			</div>
		</div>
		<div id="content">

			<div id="main">
				<div>
					<div id="hotAlbums">
						<table border="1px">
							<tr>
								<td>订单编号</td>
								<td>订单日期</td>
								<td>用户</td>
								<td>总金额</td>
								<td>状态</td>
								<td>操作</td>
								<td>详情</td>

							</tr>
							<tbody id="order-list">
							</tbody>

						</table>
					</div>
					<form id="editForm">
						<input type="hidden" id="genreId" name="id" value="0" /> 分类名称：<input
							id="genreName" name="name" /> 分类详情：<input id="description"
							name="description" />
						<button id="save" type="button">保存</button>
					</form>
				</div>
			</div>
			<div class="clearBoth"></div>
		</div>
		<div id="footer">
			<div id="footer-ad">
				<img src="/MusicStore/static/style/images/footer.png" alt=""></img>
			</div>
			<div id="footer-contactUs">
				<p>Music Store</p>
				<p>Design by Sam Chen, July,2011.</p>
			</div>
		</div>
	</div>
</body>
</html>